package com.qfedu.controller;
import com.qfedu.pojo.SysUser;
import com.qfedu.service.SysUserService;
import com.qfedu.vo.BaseResult;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/user2")

public class SysUserController {
  @Autowired
    SysUserService sysUserService;
  @RequestMapping("/login")
    public BaseResult login (@RequestBody SysUser user, HttpServletRequest req){

      return sysUserService.login(user,req);
  }
  @RequestMapping("/register")
  public BaseResult register(@RequestBody SysUser user,HttpServletRequest req){
    return sysUserService.register(user,req);
  }
  @RequestMapping("denglu")
  public BaseResult denglu (HttpServletRequest req){
    return sysUserService.denglu(req);
  }
}
